package com.leading.spring.service.impl;

import com.leading.spring.mapper.Depatmentmapper;
import com.leading.spring.modal.Depatment;
import com.leading.spring.service.DepatmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chennan
 * @create 2021-05
 */
@Service
public class DepatmentServiceImpl implements DepatmentService {

    @Autowired
    private Depatmentmapper depatmentmapper;

    public void addDepatment(Depatment depatment) {
        depatmentmapper.addDepatment(depatment);
    }

    public Depatment queryDepatment(Long id) {
        return depatmentmapper.queryById(id);
    }

    public List<Depatment> queryAll() {
        return depatmentmapper.queryAll();
    }

    public Integer updateDepatment(Depatment depatment) {
        return depatmentmapper.updateDepatment(depatment);
    }
}
